package system.mapper;

import framework.base.BaseMapper;
import org.apache.ibatis.annotations.Param;
import system.entity.SysLoginFailCounter;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;

public interface SysLoginFailCounterMapper extends Mapper<SysLoginFailCounter>, BaseMapper<SysLoginFailCounter, Long> {
    int updateBody(SysLoginFailCounter param);

    @Override
    int insertSelective(SysLoginFailCounter record);

    @Override
    List<SysLoginFailCounter> list(SysLoginFailCounter param);

    /**
     * 获取未过期列表
     *
     * @param username
     * @param expireTime
     * @return
     */
    List<SysLoginFailCounter> listNoExpired(@Param("username") String username, @Param("expireTime") Date expireTime);

    /**
     * 获取未过期列表
     *
     * @param username
     * @param expireTime
     * @return
     */
    int listNoExpiredSize(@Param("username") String username, @Param("expireTime") Date expireTime);
}